package com.formiaomiao.demain.service.impl;

import com.formiaomiao.demain.dao.PicBgDao;
import com.formiaomiao.demain.model.PicBgBean;
import com.formiaomiao.demain.model.Result;
import com.formiaomiao.demain.service.PicBgService;
import com.formiaomiao.demain.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "picBgService")
public class PicBgServiceImpl implements PicBgService {

    @Autowired
    PicBgDao picBgDao;

    @Override
    public Result<PicBgBean> SelectPicBg() {
        if (picBgDao.SelectPicBg() == null) {
            return ResultUtil.error(400,"系统错误");
        }else{
            return ResultUtil.success(picBgDao.SelectPicBg());
        }
    }
}
